<?php
    include_once '../../../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
   $folio = $_REQUEST['oidf'];

    $listado = "select pcprograma.proid,hisfecha as 'fecha',usuoid as 'usuario', hisestado as 'estado',folioid,
                rtrim(usu_nombres) +' ' + rtrim(usu_apellidos) as nombres, hisobserv,hispqrp,pchistori.hiscancelado
                from pchistori inner join pcprograma on pchistori.proid = pcprograma.proid
	        inner join usuario on pchistori.usuoid=usuario.usu_oid
                where pcprograma.folioid = ".$folio;
    $res = $con->query($listado);

    while($re = mssql_fetch_array($res)){
        $lista[] = $re;
    }
    echo json_encode($lista);
    
    $con->cerrarConexion();
    
?>